// -*- Mode: Go; indent-tabs-mode: t -*-

/*
 * This file is part of the IoT Identity Service
 * Copyright 2019 Canonical Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License version 3, as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package config

const testCA = `-----BEGIN CERTIFICATE-----
MIIDjDCCAnSgAwIBAgIJAPRcvEcoawtMMA0GCSqGSIb3DQEBCwUAMFsxCzAJBgNV
BAYTAlVLMRMwEQYDVQQIDApTb21lLVN0YXRlMQ8wDQYDVQQHDAZMb25kb24xFzAV
BgNVBAoMDklvVCBNYW5hZ2VtZW50MQ0wCwYDVQQDDARtcXR0MB4XDTE5MDQxMTIw
MzMyM1oXDTI0MDQxMDIwMzMyM1owWzELMAkGA1UEBhMCVUsxEzARBgNVBAgMClNv
bWUtU3RhdGUxDzANBgNVBAcMBkxvbmRvbjEXMBUGA1UECgwOSW9UIE1hbmFnZW1l
bnQxDTALBgNVBAMMBG1xdHQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQC9CHI5kmM1HkpsfBMHH9k+G3432cIpIhP+6AbfL7iKp6BpDZK+U/XWo3SOgaOU
25RCjvQYPjPDDGx2WHT37SPGNOE/kztxUACA8ADk2tt5CveEfEfHiasNz4ojb2vo
eMPt3q9TdY4PjfzH5Q4kLHMGmY1FXka1dF+WSaB1Psjm/UEqoYE3filtJND3E316
y2Js3Nk3WVTu+ke91jgZM4GV0xEnKlE+MdfN3odaMT6xrUVlDXaQiPzxznE/PNZW
mMbLyKFB/HPWKguPzUvTH4aFcCh+WRF/Am1oPJXfGzPLbzlO81+Wet6RgO0ZSX4E
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FSkgjw3UAlrnaI
Sq3Ei5frAGCkh+sTllLtYK2i2EFq67oeytyURH2LM84tGHqZeTdmj/ZKTGuVKW0n
Qmery+icg5rZtFUNYs0WDeeYRVic+fwpBXCjrSpG3KglcceN6uOZVFI=
-----END RSA PRIVATE KEY-----`

// TestConfig creates config settings for testing
func TestConfig() *Settings {
	return &Settings{
		Driver: DefaultDriver,
		MQTTConnect: MQTTConnect{
			ClientID:   "aaa",
			RootCA:     []byte(testCA),
			ClientCert: []byte(testServerCert),
			ClientKey:  []byte(testServerKey),
		},
	}
}
